package com.sunhao.blog.enums;

public enum ResultEnum {

    OK(200, "操作成功"),
    fail(500, "操作失败"),
    BAD_REQUEST(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权，请先登录"),
    NOT_FOUND(404, "找不到请求的资源"),
    SYSTEM_ERROR(500,"系统错误，请联系管理员");


    private int code;
    private String message;


    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
